import { getDetailData, getDetailData1 } from "../../utils/api";

const detailModule = {
  state: {
    data: null,
    data1: null,
  },
  mutations: {
    getdetail(state, playload) {
      state.data = playload.result;
      // console.log(playload.result);
    },

    getdetail1(state, playload) {
      state.data1 = playload.result;
      // console.log(playload.result);
    },
  },
  actions: {
    async getdetailasync({ commit }, playload) {
      const res = await getDetailData(playload);
      // console.log(res);
      commit("getdetail", res.data);
    },

    async getdetailasync1({ commit }, playload) {
      const res = await getDetailData1(playload);
      // console.log(res);
      commit("getdetail1", res.data);
    },
  },
  modules: {},
};

export default detailModule;
